from apps.UserControl.views import *
from rest_framework import routers
from django.conf.urls import url

# 创建路由对象
# router = routers.SimpleRouter()
router = routers.DefaultRouter()
# 注册路由
# 1.路由前缀 2.视图集
router.register(r'UserControl/user', UserModelViewSet, basename='UserControl'),
router.register(r'UserControl/permission', PermissionViewSet, basename='UserControl'),

urlpatterns = [
    url(r'UserControl/upload', UploadAPIView.as_view()),
    url(r'UserControl/password', PassWordAPIView.as_view())

]

urlpatterns += router.urls
